<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>呼叫云</title>
    <link rel="shortcut icon" href="../img/logox_circle.png">
    <link rel="stylesheet" href="../css/pintuer.css">
    <link rel="stylesheet" href="../css/admin.css">
    <script src="../js/jquery-1.11.0.min.js"></script>
    <script src="../js/config.js"></script>
    <script src="../js/jQuery.md5.js"></script>
	<script>
		$(function(){
			$("#admin").click(function(){
				$("#message").css("display","none");
			});
			$("#password").click(function(){
				$("#message").css("display","none");
			});
			var name = '${name}';
			$("#admin").val(name);
			var flag = '${flag}';
			
			if(flag == '1'){//登录成功
				var sessionStorage = window.sessionStorage;
				sessionStorage.setItem("loginName","${name}");
				location.href=serviceConfig.login.index;
				//location.href="index";
			}else if(flag == '0'){//登录失败
				$("#message").css("display","");
			}
		});
		function login(){
			var loginName = $("#admin").val();
			var password = $("#password").val();
			var pwd = "";
			if(password != ""){
				pwd = $.md5(password);
			}
			location.href=serviceConfig.login.backgroundLogin+"?name="+loginName+"&pwd="+pwd;
		}
	</script>
</head>

<body>
<div class="container">
    <div class="line">
        <div class="xs6 xm4 xs3-move xm4-move">
            <br /><br />
            <div class="media media-y">
                <a href="#" target="_blank"><img src="../img/logo3.png" style="width:80%;" class="radius" alt="后台管理系统" /></a>
            </div>
            <br /><br />
            <div class="panel">
                <div class="panel-head"><strong>登录呼叫云后台管理系统</strong></div>
                <div class="panel-body" style="padding:30px;">
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="text" class="input" style="height:45px;" name="admin" id="admin" placeholder="登录账号" value=""/>
                            <span class="icon icon-user" style="margin-top:5px;"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="password" class="input" style="height:45px;" name="password" id="password" placeholder="登录密码"/>
                            <span class="icon icon-key" style="margin-top:5px;"></span>
							<div id="message" class="alert alert-yellow" style="margin-top:6%;margin-bottom:0;display:none;">${message}</div>
                        </div>
                    </div>
                </div>
                <div class="panel-foot text-center"><button style="height:45px;" class="button button-block bg-main text-big" onclick="login()">立即登录后台</button></div>
            </div>
        </div>
    </div>
</div>
</body>
</html>